3.21 \(\int \frac{\sin ^3(x)}{a+b \cot (x)} \, dx\)

Optimal. Leaf size=121 \[ -\frac{b \sin ^3(x)}{3 \left (a^2+b^2\right )}-\frac{b^3 \sin (x)}{\left (a^2+b^2\right )^2}+\frac{a \cos ^3(x)}{3 \left (a^2+b^2\right )}-\frac{a b^2 \cos (x)}{\left (a^2+b^2\right )^2}-\frac{a \cos (x)}{a^2+b^2}+\frac{b^4 \tanh ^{-1}\left (\frac{\sin (x) (b-a \cot (x))}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}} \]

[Out]

(b^4*ArcTanh[((b - a*Cot[x])*Sin[x])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2) - (a*b^2*Cos[x])/(a^2 + b^2)^2 - (a*C
os[x])/(a^2 + b^2) + (a*Cos[x]^3)/(3*(a^2 + b^2)) - (b^3*Sin[x])/(a^2 + b^2)^2 - (b*Sin[x]^3)/(3*(a^2 + b^2))

________________________________________________________________________________________

Rubi [A]  time = 0.158869, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.462, Rules used = {3511, 3486, 2633, 2638, 3509, 206} \[ -\frac{b \sin ^3(x)}{3 \left (a^2+b^2\right )}-\frac{b^3 \sin (x)}{\left (a^2+b^2\right )^2}+\frac{a \cos ^3(x)}{3 \left (a^2+b^2\right )}-\frac{a b^2 \cos (x)}{\left (a^2+b^2\right )^2}-\frac{a \cos (x)}{a^2+b^2}+\frac{b^4 \tanh ^{-1}\left (\frac{\sin (x) (b-a \cot (x))}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]^3/(a + b*Cot[x]),x]

[Out]

(b^4*ArcTanh[((b - a*Cot[x])*Sin[x])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2) - (a*b^2*Cos[x])/(a^2 + b^2)^2 - (a*C
os[x])/(a^2 + b^2) + (a*Cos[x]^3)/(3*(a^2 + b^2)) - (b^3*Sin[x])/(a^2 + b^2)^2 - (b*Sin[x]^3)/(3*(a^2 + b^2))

Rule 3511

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/(a^2 + b^
2), Int[(d*Sec[e + f*x])^m*(a - b*Tan[e + f*x]), x], x] + Dist[b^2/(d^2*(a^2 + b^2)), Int[(d*Sec[e + f*x])^(m
+ 2)/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 + b^2, 0] && ILtQ[m, 0]

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3509

Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Dist[f^(-1), Subst[Int[1/(a^
2 + b^2 - x^2), x], x, (b - a*Tan[e + f*x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sin ^3(x)}{a+b \cot (x)} \, dx &=\frac{\int (a-b \cot (x)) \sin ^3(x) \, dx}{a^2+b^2}+\frac{b^2 \int \frac{\sin (x)}{a+b \cot (x)} \, dx}{a^2+b^2}\\ &=-\frac{b \sin ^3(x)}{3 \left (a^2+b^2\right )}+\frac{b^2 \int (a-b \cot (x)) \sin (x) \, dx}{\left (a^2+b^2\right )^2}+\frac{b^4 \int \frac{\csc (x)}{a+b \cot (x)} \, dx}{\left (a^2+b^2\right )^2}+\frac{a \int \sin ^3(x) \, dx}{a^2+b^2}\\ &=-\frac{b^3 \sin (x)}{\left (a^2+b^2\right )^2}-\frac{b \sin ^3(x)}{3 \left (a^2+b^2\right )}+\frac{\left (a b^2\right ) \int \sin (x) \, dx}{\left (a^2+b^2\right )^2}-\frac{b^4 \operatorname{Subst}\left (\int \frac{1}{a^2+b^2-x^2} \, dx,x,(-b+a \cot (x)) \sin (x)\right )}{\left (a^2+b^2\right )^2}-\frac{a \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (x)\right )}{a^2+b^2}\\ &=\frac{b^4 \tanh ^{-1}\left (\frac{(b-a \cot (x)) \sin (x)}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}}-\frac{a b^2 \cos (x)}{\left (a^2+b^2\right )^2}-\frac{a \cos (x)}{a^2+b^2}+\frac{a \cos ^3(x)}{3 \left (a^2+b^2\right )}-\frac{b^3 \sin (x)}{\left (a^2+b^2\right )^2}-\frac{b \sin ^3(x)}{3 \left (a^2+b^2\right )}\\ \end{align*}

Mathematica [A]  time = 0.59657, size = 113, normalized size = 0.93 \[ \frac{-3 a \left (3 a^2+7 b^2\right ) \cos (x)+a \left (a^2+b^2\right ) \cos (3 x)+2 b \sin (x) \left (\left (a^2+b^2\right ) \cos (2 x)-a^2-7 b^2\right )}{12 \left (a^2+b^2\right )^2}+\frac{2 b^4 \tanh ^{-1}\left (\frac{b \tan \left (\frac{x}{2}\right )-a}{\sqrt{a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^3/(a + b*Cot[x]),x]

[Out]

(2*b^4*ArcTanh[(-a + b*Tan[x/2])/Sqrt[a^2 + b^2]])/(a^2 + b^2)^(5/2) + (-3*a*(3*a^2 + 7*b^2)*Cos[x] + a*(a^2 +
 b^2)*Cos[3*x] + 2*b*(-a^2 - 7*b^2 + (a^2 + b^2)*Cos[2*x])*Sin[x])/(12*(a^2 + b^2)^2)

________________________________________________________________________________________

Maple [A]  time = 0.087, size = 163, normalized size = 1.4 \begin{align*} 2\,{\frac{-{b}^{3} \left ( \tan \left ( x/2 \right ) \right ) ^{5}-a{b}^{2} \left ( \tan \left ( x/2 \right ) \right ) ^{4}+ \left ( -4/3\,b{a}^{2}-10/3\,{b}^{3} \right ) \left ( \tan \left ( x/2 \right ) \right ) ^{3}+ \left ( -2\,{a}^{3}-4\,a{b}^{2} \right ) \left ( \tan \left ( x/2 \right ) \right ) ^{2}-{b}^{3}\tan \left ( x/2 \right ) -2/3\,{a}^{3}-5/3\,a{b}^{2}}{ \left ({a}^{2}+{b}^{2} \right ) ^{2} \left ( \left ( \tan \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{3}}}+32\,{\frac{{b}^{4}}{ \left ( 16\,{a}^{4}+32\,{a}^{2}{b}^{2}+16\,{b}^{4} \right ) \sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,\tan \left ( x/2 \right ) b-2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^3/(a+b*cot(x)),x)

[Out]

2/(a^2+b^2)^2*(-b^3*tan(1/2*x)^5-a*b^2*tan(1/2*x)^4+(-4/3*b*a^2-10/3*b^3)*tan(1/2*x)^3+(-2*a^3-4*a*b^2)*tan(1/
2*x)^2-b^3*tan(1/2*x)-2/3*a^3-5/3*a*b^2)/(tan(1/2*x)^2+1)^3+32*b^4/(16*a^4+32*a^2*b^2+16*b^4)/(a^2+b^2)^(1/2)*
arctanh(1/2*(2*tan(1/2*x)*b-2*a)/(a^2+b^2)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cot(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.82922, size = 509, normalized size = 4.21 \begin{align*} \frac{3 \, \sqrt{a^{2} + b^{2}} b^{4} \log \left (-\frac{2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, b^{2} + 2 \, \sqrt{a^{2} + b^{2}}{\left (a \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}}\right ) + 2 \,{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (x\right )^{3} - 6 \,{\left (a^{5} + 3 \, a^{3} b^{2} + 2 \, a b^{4}\right )} \cos \left (x\right ) - 2 \,{\left (a^{4} b + 5 \, a^{2} b^{3} + 4 \, b^{5} -{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{6 \,{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cot(x)),x, algorithm="fricas")

[Out]

1/6*(3*sqrt(a^2 + b^2)*b^4*log(-(2*a*b*cos(x)*sin(x) - (a^2 - b^2)*cos(x)^2 - a^2 - 2*b^2 + 2*sqrt(a^2 + b^2)*
(a*cos(x) - b*sin(x)))/(2*a*b*cos(x)*sin(x) - (a^2 - b^2)*cos(x)^2 + a^2)) + 2*(a^5 + 2*a^3*b^2 + a*b^4)*cos(x
)^3 - 6*(a^5 + 3*a^3*b^2 + 2*a*b^4)*cos(x) - 2*(a^4*b + 5*a^2*b^3 + 4*b^5 - (a^4*b + 2*a^2*b^3 + b^5)*cos(x)^2
)*sin(x))/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin ^{3}{\left (x \right )}}{a + b \cot{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**3/(a+b*cot(x)),x)

[Out]

Integral(sin(x)**3/(a + b*cot(x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.32196, size = 271, normalized size = 2.24 \begin{align*} -\frac{b^{4} \log \left (\frac{{\left | 2 \, b \tan \left (\frac{1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac{1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt{a^{2} + b^{2}}} - \frac{2 \,{\left (3 \, b^{3} \tan \left (\frac{1}{2} \, x\right )^{5} + 3 \, a b^{2} \tan \left (\frac{1}{2} \, x\right )^{4} + 4 \, a^{2} b \tan \left (\frac{1}{2} \, x\right )^{3} + 10 \, b^{3} \tan \left (\frac{1}{2} \, x\right )^{3} + 6 \, a^{3} \tan \left (\frac{1}{2} \, x\right )^{2} + 12 \, a b^{2} \tan \left (\frac{1}{2} \, x\right )^{2} + 3 \, b^{3} \tan \left (\frac{1}{2} \, x\right ) + 2 \, a^{3} + 5 \, a b^{2}\right )}}{3 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}{\left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cot(x)),x, algorithm="giac")

[Out]

-b^4*log(abs(2*b*tan(1/2*x) - 2*a - 2*sqrt(a^2 + b^2))/abs(2*b*tan(1/2*x) - 2*a + 2*sqrt(a^2 + b^2)))/((a^4 +
2*a^2*b^2 + b^4)*sqrt(a^2 + b^2)) - 2/3*(3*b^3*tan(1/2*x)^5 + 3*a*b^2*tan(1/2*x)^4 + 4*a^2*b*tan(1/2*x)^3 + 10
*b^3*tan(1/2*x)^3 + 6*a^3*tan(1/2*x)^2 + 12*a*b^2*tan(1/2*x)^2 + 3*b^3*tan(1/2*x) + 2*a^3 + 5*a*b^2)/((a^4 + 2
*a^2*b^2 + b^4)*(tan(1/2*x)^2 + 1)^3)